#ifndef __MYADC_H
#define __MYADC_H

#include "n32g45x.h"

typedef struct ADC_Value
{
	__IO uint16_t usNTC_ADC_Median;
	__IO uint16_t usBAT_ADC_Median;
	__IO uint16_t usGMV_ADC_Median;
	__IO uint16_t usVUSB_ADC_Median;	
}ADC_Value;

extern ADC_Value ADC_Value1;

//#define BAT_ADC_Channel ADC1_Channel_02_PA1
////#define BAT_ADC_Channel ADC2_Channel_02_PA5
//#define NTC_ADC_Channel ADC1_Channel_03_PA6


#define GMV_ADC_Channel 	ADC1_Channel_02_PA1
#define BAT_ADC_Channel 	ADC2_Channel_02_PA5
#define NTC_ADC_Channel 	ADC1_Channel_03_PA6
#define VUSB_ADC_Channel 	ADC2_Channel_01_PA4

void ADC_Initial(void);
uint16_t ADC_GetData(ADC_Module* ADCx, uint8_t ucADC_Channel);
void ADC_Scan(void);

#endif

